package com.llh.designpatterns.factory.simplefactory.demo01;

/**
 * <h2>车的抽象类</h2>
 * <p>定义了车的共同方法</p>
 * <p>CreatedAt: 2019-11-25 22:19</p>
 * <p><a href="mailto:forever2y_y@163.com">SendMailToMe</a></p>
 *
 * @author llh
 */
public abstract class Car {
    private String name;

    protected void run() {
        System.out.println(name + " can run... ");
    }

    protected void alert() {
        System.out.println(name + " can alert others...");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
